.org-management {
  position: relative;

  // 打开右侧详情面板时，为表格区域预留空间
  &.detail-open {
    padding-right: 420px;
    transition: padding-right .25s ease;
  }
  .search-section {
    margin-bottom: 20px;
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    .current-level {
      font-size: 14px;
      color: #606266;
      font-weight: 500;
    }
  }

  .pagination-wrapper {
    margin-top: 20px;
    text-align: right;
  }

  .operation-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    
    .el-button {
      margin: 0;
      min-width: 60px;
    }
  }

  // 表格样式优化
  .el-table {
    .el-table__header {
      th {
        background-color: #f5f7fa;
        color: #606266;
        font-weight: 600;
      }
    }

    .el-table__body {
      tr:hover {
        background-color: #f5f7fa;
      }
    }
    
    // 修复表格滚动条闪动问题
    .el-table__body-wrapper {
      &::-webkit-scrollbar {
        width: 8px;
        height: 8px;
      }
      
      &::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
      }
      
      &::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
        transition: background-color 0.2s ease;
        
        &:hover {
          background: #a8a8a8;
        }
      }
      
      &::-webkit-scrollbar-corner {
        background: #f1f1f1;
      }
    }
  }

  // 标签样式
  .el-tag {
    font-size: 12px;
    padding: 0 8px;
    height: 24px;
    line-height: 22px;
  }

  // 对话框样式
  .el-dialog {
    .el-dialog__header {
      background-color: #f5f7fa;
      padding: 15px 20px;
      border-bottom: 1px solid #e4e7ed;
      
      .el-dialog__title {
        font-weight: 600;
        color: #303133;
      }
    }

    .el-dialog__body {
      padding: 20px;
    }

    .el-dialog__footer {
      padding: 15px 20px;
      background-color: #f5f7fa;
      border-top: 1px solid #e4e7ed;
      text-align: right;
    }
  }

  // 表单样式
  .el-form {
    .el-form-item {
      margin-bottom: 18px;
      
      .el-form-item__label {
        font-weight: 500;
        color: #606266;
      }
    }
  }

  // 搜索区域样式
  .search-section {
    .el-card {
      .el-card__body {
        padding: 15px 20px;
      }
    }
  }

  // 机构列表样式
  .org-list {
    .el-card {
      .el-card__body {
        padding: 0;
      }
    }
  }

  // 响应式设计
  @media (max-width: 768px) {
    .operation-buttons {
      flex-direction: row;
      flex-wrap: wrap;
      gap: 8px;
      
      .el-button {
        min-width: 50px;
        font-size: 12px;
        padding: 5px 10px;
      }
    }

    .el-dialog {
      width: 95% !important;
      margin: 0 auto;
    }
  }

  // 状态标签特殊样式
  .el-tag--success {
    background-color: #f0f9ff;
    border-color: #67c23a;
    color: #67c23a;
  }

  .el-tag--danger {
    background-color: #fef0f0;
    border-color: #f56c6c;
    color: #f56c6c;
  }

  .el-tag--warning {
    background-color: #fdf6ec;
    border-color: #e6a23c;
    color: #e6a23c;
  }

  .el-tag--info {
    background-color: #f4f4f5;
    border-color: #909399;
    color: #909399;
  }

  .el-tag--primary {
    background-color: #ecf5ff;
    border-color: #409eff;
    color: #409eff;
  }

  // 机构树样式
  .org-tree-panel {
    border: 1px solid #ebeef5;
    border-radius: 4px;
    padding: 8px 12px;
    background: #fff;

    .panel-title {
      font-size: 14px;
      color: #606266;
      margin-bottom: 8px;
      font-weight: 500;
    }

    .org-tree {
      max-height: 420px;
      overflow: auto;
      padding: 8px 4px;
      background: #fafafa;
      border: 1px dashed #e4e7ed;
      border-radius: 4px;
    }

    .org-tree-node {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      .org-tree-name {
        font-weight: 500;
        color: #303133;
      }
      .ml4 { margin-left: 4px; }
      .ml8 { margin-left: 8px; }
    }

    .org-summary {
      padding: 8px 10px;
      background: #fff;
      border: 1px solid #ebeef5;
      border-radius: 4px;
      margin-bottom: 10px;

      .org-summary-name {
        font-size: 16px;
        font-weight: 600;
        color: #303133;
        margin-bottom: 6px;
      }
      .org-summary-tags {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
      }
      .org-summary-meta {
        font-size: 12px;
        color: #606266;
        .meta-item { margin-bottom: 4px; }
        .meta-label { color: #909399; }
        .meta-value { color: #303133; }
      }
    }

    .mt12 { margin-top: 12px; }

    .org-add-user {
      display: flex;
      align-items: center;
      margin-top: 8px;
    }
  }
}

// 右侧详情面板（参考文章详情样式）
.right-side-detail-panel {
  position: fixed;
  right: 16px;
  top: 56px; // 由64px再上移，消除与页面标题的空隙
  bottom: 16px;
  width: 404px;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  .detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;

    .header-title {
      font-size: 18px; // 原16
      font-weight: 600;
      margin: 0;
    }
  }

  .detail-content {
    padding: 12px;
    overflow: auto;

    .info-section { margin-bottom: 12px; }
    .info-title { font-weight: 700; font-size: 16px; margin: 8px 0 8px; } // 原14

    .org-brief {
      padding: 10px 12px;
      background: #fff;
      border: 1px solid #ebeef5;
      border-radius: 4px;
      margin-bottom: 8px;

      &__name {
        font-size: 18px; // 原16
        font-weight: 700;
        color: #303133;
        margin-bottom: 8px;
      }

      &__tags {
        display: flex;
        gap: 8px;
        margin-bottom: 8px;
      }

      &__meta {
        font-size: 14px; // 原12
        color: #606266;
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 6px;
      }
    }

    .operation-buttons-container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
      margin-bottom: 10px;

      .el-button {
        width: 100%;
        margin: 0;               // 避免按钮自身外边距导致错位
        box-sizing: border-box;   // 统一盒模型，避免溢出
        white-space: nowrap;      // 防止自动换行撑开
        display: inline-flex;
        justify-content: center; // 文本居中
        align-items: center;
        height: 36px;            // 统一高度
      }
    }

    .org-add-user { margin-top: 8px; }

    .org-tree {
      background: #fafafa;
      border: 1px dashed #e4e7ed;
      border-radius: 4px;
      padding: 8px 6px;
    }
  }
}
